<template>
    <div class="fullScreen bg-c-wh">
        <m-header :msg="'历史走势'"></m-header>
        <div class="marg-05 tx-c tx-s-12 line-h2">
            <div class="flex-box bg-c-g bor-r">
                <div class="wd-25 bor-lt">期数</div>
                <div class="wd-15 bor-lt">总和大小</div>
                <div class="wd-15 bor-lt">总和单双</div>
                <div class="wd-15 bor-lt">前三</div>
                <div class="wd-15 bor-lt">中三</div>
                <div class="wd-15 bor-lt">后三</div>
            </div>
            <div class="scroll-box tx-c-666">
                <div class="bor-rb">
                    <div class="flex-box" v-for="item in list" :key="item.issue">
                        <div class="wd-25 bor-lt">{{ item.issue }}</div>
                        <div class="wd-15 bor-lt">{{ item.zhDX }}</div>
                        <div class="wd-15 bor-lt">{{ item.zhDS }}</div>
                        <div class="wd-15 bor-lt">{{ item.qs }}</div>
                        <div class="wd-15 bor-lt">{{ item.zs }}</div>
                        <div class="wd-15 bor-lt">{{ item.hs }}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script type="text/ecmascript-6">
import 'common/css/user.css'
import MHeader from '../../../components/m-header'
import { trendAll } from '../../../common/js/axiosUtil'
export default {
    data () {
        return {
            list : []
        }
    },
    created () {
        this.getData()
    },
    methods : {
        // 获取历史走势数据
        getData () {
            this.$toast('加载中...', 1000000) 
            let params = new URLSearchParams()
            const token = this.$token()
            params.append('timeStamp', token[0])
            params.append('token', token[1])
            params.append('type', this.$store.state.lotType) 
            trendAll(params)
            .then((response)=> { 
                this.$toastClose()
                if(response.data.code == "200"){ 
                    this.list = response.data.data
                } else {
                    this.$logAgain(response.data.msg)
                } 
            })
            .catch((error)=> {
                this.$toast('请求服务失败', 2000)
            })
        }
    },
    components: {
        MHeader
    }
}
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
    .scroll-box
        position : fixed 
        top : 5.25rem
        bottom : 0
        left : .5rem
        right : .5rem
        overflow: auto
    .scroll-box::-webkit-scrollbar
        display : none 
    .line-h2
        line-height : 2rem
    .wd-25
        width : 25%
    .wd-15
        width : 15%
    .bor-lt
        border-left : 1px solid #ccc
        border-top : 1px solid #ccc
    .bor-rb
        border-right : 1px solid #ccc
        border-bottom : 1px solid #ccc
    .bor-r
        border-right : 1px solid #ccc
</style>